package com.lhr.common.support;

import org.apache.log4j.Level;
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.spi.TriggeringEventEvaluator;

/**
 * 应用在Log4j发送邮件的 Warn级别的日志 <br/>
 * log4j.appender.Email.EvaluatorClass=com.lhr.common.support.WarnEvaluator
 */
public class WarnEvaluator implements TriggeringEventEvaluator {

	@Override
	public boolean isTriggeringEvent(LoggingEvent event) {
		return event.getLevel().isGreaterOrEqual(Level.WARN);
	}

}
